<!DOCTYPE HTML>
<title>SVGTransformList, createSVGTransformFromMatrix argument type</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(function() {
  // This test checks the SVGTransformList.createSVGTransformFromMatrix argument type.

  var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  var rectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect");
  var transform = rectElement.transform.baseVal;

  // Check passing invalid arguments to 'createSVGTransformFromMatrix'.
  assert_throws_js(TypeError, function() { transform.createSVGTransformFromMatrix(); });
  assert_throws_js(TypeError, function() { transform.createSVGTransformFromMatrix(svgElement.createSVGTransform()); });
  assert_throws_js(TypeError, function() { transform.createSVGTransformFromMatrix(svgElement); });
  assert_throws_js(TypeError, function() { transform.createSVGTransformFromMatrix('aString'); });
  assert_throws_js(TypeError, function() { transform.createSVGTransformFromMatrix(1); });
  assert_throws_js(TypeError, function() { transform.createSVGTransformFromMatrix(true); });
  assert_throws_js(TypeError, function() { transform.createSVGTransformFromMatrix(undefined); });
  assert_throws_js(TypeError, function() { transform.createSVGTransformFromMatrix(null); });
});
</script>